#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int n = 20;
	int sum = 20;
	while (n)
	{
		n /= 2;
		sum += n;
	}
	printf("%d\n", sum);
}


